package org.example.blogpojo.blog.domain;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * Tb Article表
 * @TableName tb_article
 */
@Data
public class Article implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema (description = "文章ID")
    private Long id;

    @Schema (description = "文章封面")
    private String articlePic;

    @Schema (description = "文章名称")
    private String articleName;

    @Schema (description = "文章标签")
    private String articleTag;

    @Schema (description = "文章类型")
    private Long articleType;

    @Schema (description = "文章状态0:草稿，1:分布，2:弃用")
    private Integer articleState;

    @Schema (description = "是否置顶0:不置顶,1:置顶")
    private Integer topState;

    @Schema (description = "作者ID")
    private Long publishId;

    @Schema (description = "创建时间")
    @JsonFormat (pattern = "yyyy-MM-dd")
    private Date createTime=new Date();

    @Schema (description = "修改时间")
    @JsonFormat (pattern = "yyyy-MM-dd")
    private Date updateTime=new Date();

    @Schema (description = "文章阅读量")
    private Integer articleReadCount;

    @Schema (description = "文章点赞数")
    private Integer articleStarNum;

    @Schema (description = "文章评论数")
    private Integer articleCommentNum;

    @Schema (description = "文章介绍")
    private String articleRemark;

    @Schema (description = "文章内容")
    private String articleContent;

    @Schema (description = "文章类型")
    private ArticleType at;

    @Schema (description = "作者姓名")
    private Employee em;
}